package com.repair.api.user.request;

import com.repair.api.user.request.condition.UserCondition;
import com.repair.api.user.request.condition.UserIdQueryCondition;
import com.repair.api.user.request.condition.UserPhoneQueryCondition;
import com.repair.api.user.request.condition.UserStateQueryCondition;
import com.repair.api.user.response.UserQueryResponse;
import com.repair.base.request.BaseRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author chunyu
 * @since 2024/9/21,14:41
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class UserQueryRequest extends BaseRequest {

    private static final long serialVersionUID = 1L;

    private UserCondition userCondition;

    public UserQueryRequest(String telephone) {
        UserPhoneQueryCondition userPhoneQueryCondition = new UserPhoneQueryCondition();
        userPhoneQueryCondition.setTelephone(telephone);
        this.userCondition = userPhoneQueryCondition;
    }

    public UserQueryRequest(Long id) {
        UserIdQueryCondition userIdQueryCondition = new UserIdQueryCondition();
        userIdQueryCondition.setId(id);
        this.userCondition = userIdQueryCondition;
    }
}
